<template>
  <view class="content">
    GTPlugin
  </view>
</template>

<script>
  export default {
    data() {
      return {
      }
    },
    onLoad() {
      console.log("page mounted ")
      uni.setDebugLogger(function(res) {
        console.log(res)
      });
      
      // uni.setPushAction({
      //   onReceiveClientId: function(cid) {
      //     console.log("收到 cid onReceiveClientId : " + cid)
      //   }
      // });
      
      console.log("开始初始化个推推送")
      
      uni.onPushMessage((res) => {
        console.log("onPushMessage => " + JSON.stringify(res))
      }) 
      
      uni.getPushClientId({
      	success: (res) => {
      		console.log("getPushClientId success => " + JSON.stringify(res));
      	},
      	fail: (res) => {
      		console.log("getPushClientId fail => " + JSON.stringify(res));
      	},
      	complete: (res) => {
      		console.log("getPushClientId complete => " + JSON.stringify(res));
      	}
      });
      
      uni.initPush();
    },
    methods: {

    }
  }
</script>

<style>
</style>